﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace AMSReportBuildService
{
    abstract class Configure
    {
        static string configFile = System.Windows.Forms.Application.StartupPath + @"\ServiceConfig.xml";

        public static string GetConnectionString()
        {
            var m_XmlReader = new ObjXmlReader(configFile);
            XmlNode node = m_XmlReader.GetXmlNode("serviceConfig/connectionString");
            if (node != null)
            {
                return m_XmlReader.GetNodeAttributeValue(node, "value", true);
            }
            return "Data Source=192.168.1.11;Initial Catalog=VIT_AMS;User ID=sa;Password=vitcodesa";
        }
    }
}
